<?php

$AttendanceRecordID = intval($_REQUEST['AttendanceRecordID']);

include 'conn.php';
$sql1 = "select * from attendancerecord where AttendanceRecordID='$AttendanceRecordID'";
$result1 = @mysql_query($sql1);
if (mysql_num_rows($result1)==1) {
    
        $sql = "delete from attendancerecord where AttendanceRecordID='$AttendanceRecordID'";
        $result = @mysql_query($sql);
        if ($result)
            echo json_encode(array('success' => true));
        
     else {
        echo json_encode(array('msg' => 'Cannot Delete Attendance!'));
    }
}
?>